<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%><%@ include file="/include/commons.jsp"%>
<c:set var="saveType" value="save"></c:set>
<c:if test="${op eq 'modify'}">
	<c:set var="saveType" value="update"></c:set>
</c:if>
<h2 class="contentTitle">添加用户</h2>
<form method="post" action="sys/users/add.action?op=${saveType}&navTabId=userLiNav&callbackType=closeCurrent" class="required-validate pageForm" onsubmit="return validateCallback(this, navTabAjaxDone);">
	<input type="hidden" name="userType" value="PERSON"/>
	<input type="hidden" name="user.id" value="${user.id}">
	<input type="hidden" name="user.companyId" value="${user.companyId}">
	<div class="pageFormContent" layoutH="97">
		<h3>基本资料</h3>
		<div class="divider"></div>
		<p>
			<label>登录名：</label>
			<c:choose>
				<c:when test="${op eq 'add'}"><input type="text" name="user.loginName" class="required" size="20" minlength="4" maxlength="20" title="请输入登录名"/></c:when>
				<c:otherwise>${user.loginName}</c:otherwise>
			</c:choose>
		</p>
		<p>
			<label>用户名：</label>
			<input type="text" name="user.userName" class="required" size="20" value="${user.userName}" maxlength="60" title="请输入该用户的真实姓名"/>
		</p>
		<p>
			<label>昵称：</label>
			<input type="text" name="user.nickname" class="" size="20" value="${user.nickname}" maxlength="60"/>
		</p>
		<p>
			<label>出生日期：</label>
			<input type="text" name="user.birthday" size="18" value="${user.birthday}" class="date" yearstart="-80" yearend="0" format="yyyy-MM-dd" readonly/>
			<a class="inputDateButton" href="#">Choose</a>
		</p>
		<p>
			<label>手机：</label>
			<input type="text" name="user.mobilePhone" class="required phone" maxlength="11" size="20" value="${user.mobilePhone}" title="请输入手机号"/>
		</p>
		<p>
			<label>手机短号：</label>
			<input type="text" name="user.mobileSmall" class="" maxlength="11" size="20" value="${user.mobileSmall}"/>
		</p>
		<p>
			<label>电子邮件：</label>
			<input type="text" name="user.email" class="required email" maxlength="60" size="22" value="${user.email}" title="请输入电子邮件地址"/>
		</p>
		<p>
			<label>性别：</label>
			<select name="user.sex">
				<option value="0" <c:if test="${user.sex==0}">selected</c:if>>男</option>
				<option value="1" <c:if test="${user.sex==1}">selected</c:if>>女</option>
			</select>
		</p>
		<p>
			<label>用户状态：</label>
			<select name="user.isLock">
				<option value="0" <c:if test="${user.isLock==0}">selected</c:if>>正常</option>
				<option value="1" <c:if test="${user.isLock==1}">selected</c:if>>锁定</option>
			</select>
		</p>
		<p>
			<label>管理员：</label>
			<select name="user.isAdmin">
				<option value="0" <c:if test="${user.isAdmin==0}">selected</c:if>>否</option>
				<option value="1" <c:if test="${user.isAdmin==1}">selected</c:if>>是</option>
			</select>
		</p>
		<p>
			<label>排序：</label>
			<input type="text" name="user.userOrd" maxlength="10" minlength="1" size="10" value="<c:choose><c:when test='${empty user.userOrd}'>1</c:when><c:otherwise>${user.userOrd}</c:otherwise></c:choose>" />
		</p>
		<p>
			<label>所属部门：</label>
			<input type="text" name="user.depts.deptId" maxlength="10" minlength="1" size="10" value="" />
		</p>
	</div>
			
	<div class="formBar">
		<ul>
			<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
			<li><div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div></li>
		</ul>
	</div>
</form>